package cn.ycc1.mymiddle.config;

import cn.ycc1.mymiddle.functioncalling.weather.MockWeatherService;
import cn.ycc1.mymiddle.functioncalling.weather.WeatherModels;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Function;

/**
 * @author ycc
 * @date 2025/5/1
 */
@Configuration
public class WeatherConfig {
    @Bean
    public Function<WeatherModels.Request, WeatherModels.Response> currentWeather() { // (1) bean name as function name.
        return new MockWeatherService();
    }
}
